package com.example.clinetoffline.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: client offline warning
 * @description: state表设备下线后警示弹窗
 * @author: xingzh
 * @create: 2022-09-01 14:34
 **/
@RestController
@Slf4j
public class ClientOfflineController implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        log.info("开启下线报警线程");
        //启动一个循环检测客户端连接状态的线程
        new Thread(new AlarmThread()).start();
    }
}
